package demo8;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * 配置类
 *
 * 被@Configuration注解标注的类作为容器的配置类使用
 *
 *
 * @ComponentScan注解，用于告知容器扫描哪个包
 */
@Configuration
@ComponentScan("demo8")
public class Config {
    @Bean
    public Student initStudent(){
        return new Student();
    }

}
